Carlos Garnacho [Wed, 29 Jun 2022 11:06:07 +0000 (13:06 +0200)]
ibusCandidatePopup: Set OSK candidates list visibility correctly
Right now, we don't pay much attention to visibility hints from IBus
about the candidates list for the OSK suggestions bar. Since some
IMs rely on this visibility being honored, do that.
To fix this, the visibility hints for the lookup table are now
propagated to the keyboard, so the Suggestions actor hides its
internal candidate buttons. Since the Suggestions actor gets its
minimum height from CSS, this does not result in OSK size jumps.
Carlos Garnacho [Mon, 27 Jun 2022 11:55:34 +0000 (13:55 +0200)]
keyboard: Set ornament on selected item in OSK languages popup menu
There is no hint about the currently selected language, but this exists
in the mockups. Add a dot ornament on the language that is currently
selected at the time of showing the OSK languages popup.
Since this popup is created from scratch every time it is shown, and
the popup is torn down with the OSK during replacement. This also
works for further times the languages popup is shown.
Olivier Fourdan [Tue, 14 Jun 2022 14:38:27 +0000 (16:38 +0200)]
kbdA11yDialog: Use MetaKeyboardA11yFlags
The change in mutter to move keyboard accessibility into backends needs
to be applied in gnome-shell as well, otherwise the keyboard
accessibility dialog cannot work.
Florian Müllner [Fri, 3 Jun 2022 18:32:03 +0000 (20:32 +0200)]
st: Only notify on property changes
Since commit 5a23c96bd918 we use EXPLICIT_NOTIFY for properties,
however there are still cases where we still notify unconditionally
from the setter, because we don't check the existing value first.
Sam Hewitt [Tue, 26 Apr 2022 18:19:41 +0000 (15:49 -0230)]
style: High-contrast fixes and color adjustments
- pull in the palette changes to the HC css
- adjust the color definitions for HC
- address some of the problems with hover states in HC
- reworked drawing functions for HC
msizanoen1 [Thu, 26 May 2022 06:15:06 +0000 (13:15 +0700)]
shell: Do not create a systemd scope when using D-Bus app launching
Applications launched using D-Bus activation will have a returned PID of
0, which systemd interprets as moving the requesting process to a new
scope, causing GNOME Shell to be moved to another scope. Fix this by not
creating a systemd scope when PID is 0.
Sam Uong [Mon, 6 Jun 2022 10:45:25 +0000 (10:45 +0000)]
screenshot: Fall back to home if Pictures directory is not available
GLib.get_user_special_dir() returns null if user directories are
disabled. Instead of failing silently, fall back to saving screenshots
in $HOME/Screenshots in that case
PhilProg [Fri, 3 Jun 2022 04:53:11 +0000 (04:53 +0000)]
messageList: Only close messages via delete key if they can be closed
If the delete key is pressed while a message/MPRIS indicator is focused
GNOME now asks whether the message/MPRIS indicator is closable.
If yes it will be closed but if not it won't be closed.
Sebastian Keller [Tue, 31 May 2022 16:18:45 +0000 (18:18 +0200)]
magnifier: Include SSD when calculating screen coordinates for events
When calculating the on screen coordinates of events from the window
relative coordinates, using the frame rect will include the decorations
added by the WM for SSD windows. This was causing the calculated
coordinates to be slightly off. Fix this by using the client rect for
SSD windows.
Sebastian Keller [Mon, 23 May 2022 21:01:23 +0000 (23:01 +0200)]
magnifier: Request window-relative coordinates for focus/caret events
Absolute screen coordinates are impossible for Wayland clients to
provide, because the clients don't know where the window is positioned.
Some clients, such as the ones using GTK 3 were providing window
relative coordinates even when screen coordinates were requested,
while others, such as GTK 4 clients, were just returning an error for
caret events or also window-relative coordinates for focus events.
So for this to work on Wayland we have to request window-relative
coordinates and translate them to the current focus window.
To ensure the correct coordinates, we have to only consider events
coming from the current focus window. All other events are filtered out
now. As a side effect this also fixes the magnifier always jumping
to a terminal cursor whenever there was some output, even if the window
was not focused.
This also needs some special handling for events coming from the shell
itself, which should not be translated to the focus window either. As
another side effect this fixes another bug that was caused by these
events already including scaling and getting scaled again.
Jonas Dreßler [Thu, 26 May 2022 16:13:12 +0000 (18:13 +0200)]
keyboard: Reset height before requesting preferred height
If we don't set the height property to -1 before requesting the
preferred height, get_preferred_height() will just return us the fixed
height that has been set before. We don't want this behavior here, so
set the height to -1 before calling get_preferred_height().
This fixes a resizing issue where the keyboard is sized incorrectly
after switching the monitor into portrait mode and back.
status/network: Show WireGuard connections in VPN list
With this change, WireGuard connections, and an on/off toggle button
or a status description for each are shown in the VPN section of the
Gnome Shell network status UI.
Florian Müllner [Wed, 18 May 2022 14:49:41 +0000 (16:49 +0200)]
config: Check runtime dependencies at runtime
Both bluetooth and screencast support are based on build checks
right now. However in both cases, the dependency is only consumed
at runtime via the typelib, so let's actually check for that.
Florian Müllner [Wed, 18 May 2022 14:43:45 +0000 (16:43 +0200)]
dbusServices/screencast: Install unconditionally
We currently decide at build time whether to include screencast
support, based on whether the required gst/pipewire library headers
are installed.
That check is imprecise, because having the library headers available
at build time doesn't necessarily mean that the libraries are there
at runtime, or that the corresponding typelibs are installed.
It makes more sense to check the requirements at runtime, so prepare
for that by installing the screencast service unconditionally, but
bail out early if the dependencies aren't met.
Florian Müllner [Fri, 13 May 2022 12:30:00 +0000 (14:30 +0200)]
lockScreen: Extend modal grab to entire uiGroup
Main.pushModal() used to ensure a compositor grab, but didn't
take an input grab. That changed when porting to ClutterGrab,
so by limiting the grab to the shield/dialog, it is no longer
possible to access top bar menus when the screen is locked.
To fix that, take the grab on the whole uiGroup so that the top
bar is included.
Maksym Hazevych [Sat, 7 May 2022 15:27:08 +0000 (18:27 +0300)]
dateMenu: Align time strings in the World Clocks section
The problem is that " 9:59 AM" (notice the space at the beginning) and
"12:59 AM" strings, when centred, look misaligned —
strings padded with a space look off to the right by nearly
half a character. This happens because the font feature "tnum",
used to make numbers monospace, doesn't work on spaces.
The commit overcomes this by aligning time labels to the end.
However, this won't work for locales with AM/PM strings of different
lengths, so they are aligned to the start instead to minimise offset.
It's too complex to know whether the used locale has different
AM/PM string lengths. Instead, every time the time changes, it
determines whether all the time labels have the same amount of characters.
Florian Müllner [Tue, 17 May 2022 13:36:43 +0000 (15:36 +0200)]
build: Do not redefine polkit autocleanup
PolkitAgent recently added autocleanup functions itself, so check
for their existence at configure time and only define our own when
they don't exist upstream.
Florian Müllner [Wed, 11 May 2022 00:34:21 +0000 (02:34 +0200)]
status/volume: Hide sliders initially
We update the visibility on state or stream changes, but those
changes may never happen if pipewire-pulse/pulseaudio isn't
available (for example when running as root).
Hiding the sliders is preferable in that case to showing non-working
controls.
Florian Müllner [Mon, 21 Mar 2022 15:07:11 +0000 (16:07 +0100)]
st/button: Add :icon-name property
GTK4 added a convenience property for icon-only buttons. While that
use case is not quite as common in the shell as in GTK apps, it still
seems common enough to mirror the GTK API.
When selecting the largest possible icon size for restricted vertical or
horizontal space the options for low resolution icons were rather coarse
grained. This could often result in seemingly too small icons being
chosen in the app grid on systems with low vertical resolution, because
the next larger size would exceed the limit by a few pixels.
This adds two more commonly used sizes for application icons to have
some more options with restricted space.
Sebastian Keller [Sat, 30 Apr 2022 06:18:39 +0000 (08:18 +0200)]
Require both mouse and keyboard grabs for some grabs to be successful
Commit 7419674b changed some grabs from requiring both mouse and
keyboard grabs to be considered successful to only requiring either of
them.
Due to this it was possible for example to open the overview or the
screenshot UI with a client (such as Chrome when opening a menu) holding
the mouse grab. This then made it impossible to interact with the UI
using the mouse (or keyboard) and if attempted could result in an
unresponsive UI.
Sebastian Keller [Fri, 29 Apr 2022 21:30:21 +0000 (23:30 +0200)]
st/theme-node: Only try to parse non-empty inline styles
Otherwise cr_parser_new_from_buf() will fail creating a parser for a
buffer of length 0, resulting in further errors due to the parser being
NULL. This could happen when extensions were trying to set the style of
a widget to an empty string.
screenshot: Hide screencast button when recorder is disabled
The screencast D-Bus service that is used for the recordings
is only installed if the necessary gstreamer and pipewire
dependencies are found at build time.
The screencast button cannot work when the service is missing,
so don't show it in the first place.
Jonas Dreßler [Tue, 26 Apr 2022 17:01:14 +0000 (19:01 +0200)]
status/network: Also show disabled icon when wwan is not connected
Commit ca4f6e01234e9ef7f1315fcb13b89423da670dc7 was supposed to show the
"cellular-disabled" icon when wwan is disabled. For wwan, just like for
bluetooth wwan networks, we probably want this to include the "not
connected" state, because disconnecting from cellular service de-facto
means disabling it.
So switch the check to show the "cellular-disabled" icon to also use the
icon whether there's no active connection, not only when the wwan device
is turned off.
Jonas Dreßler [Tue, 26 Apr 2022 16:45:40 +0000 (18:45 +0200)]
theme/calendar: Use em instead of px for calendar day sizes
The layout manager of the calendar/notifications popup is using the
calendar width to determine the width of the whole right area of the
calendar popup. When enabling large text, this means the cards used for
world clocks, weather etc. get larger, while the calender doesn't get
larger, leading to the cards getting clipped.
Make sure the calendar grows in size just as the cards do when large
text is enabled and define its size in em's instead of pixels.
Carlos Garnacho [Tue, 26 Apr 2022 11:09:01 +0000 (13:09 +0200)]
overview: Avoid entering in overview mode during display grab op
ClutterGrab and display grab operations are pretty much mutually
exclusive, but there's no mechanism to ensure a ClutterGrab does
not step on top of an existing grab operation.
This looks the only place that could trigger that (e.g. start
dragging window, then move pointer to top/left corner), so skip
over the situation here explicitly.
Jonas Dreßler [Sat, 9 Apr 2022 22:48:39 +0000 (00:48 +0200)]
appDisplay: Use icon grid size as distance passed to SwipeTracker
The swipeTracker wants the distance between two pages passed to it in
confirmSwipe(). In case of the app grid, the correct distance is not the
size of the scrollView (which has the width of the whole screen), but
instead the allocation size of the iconGrid (which is the actual size
of a page in the grid).
So pass the allocation size of the iconGrid to the swipeTracker, this
makes sure the pages move perfectly in sync with the pointer when
dragging using the mouse or touchscreen.
Jonas Dreßler [Wed, 6 Apr 2022 10:51:45 +0000 (12:51 +0200)]
Pass events to the OSK in dialogs which grab events
With commit c29e0cf6e60a1296b43fc33d94f2acc649046cf9 the grabHelper
already started using a similar mechanism to funnel events to the osk
while a ClutterGrab is in effect. ModalDialog, the unlockDialog and
lookingGlass don't make use of the grabHelper though, they use
Main.pushModal() themselves, so those need to funnel the events to the
OSK themselves.
Jonas Dreßler [Wed, 6 Apr 2022 10:50:32 +0000 (12:50 +0200)]
keyboard: Capture and bubble event in maybeHandleEvent
Right now the clutter_actor_event() call here errors out because the
second argument is missing, make it capture and bubble the event
properly to fix that.
Sebastian Keller [Mon, 21 Mar 2022 19:45:36 +0000 (20:45 +0100)]
shell/window-preview-layout: Fix memory leaks
The WindowInfo allocated when adding a window was not getting free'd
when the window was getting removed again or the layout was getting
disposed. Also the hash table in which the WindowInfos are stored was
not getting free'd on destruction either. Both could result in small
leaks after closing the overview.
Commit fe3a80ab9fcf added layouts for both Swiss French and Swiss
French, but as neither name matches the XKB layout code, they are
not used and the OSK falls back to the US layout.
The correct names are 'ch' (for Switch German) and 'ch+fr', so
rename the layout definitions accordingly.
Currently the main looking glass dialog handles Esc for both itself
and the object inspector. However as the latter now takes its own
Clutter.Grab, key events never reach the main dialog while the
inspector is open.
Fix this by handling the Esc key in the object inspector itself.